import request from '@/utils/request'

// 查询出库单列表
export function listChukuInfo(query) {
  return request({
    url: '/business/chukuInfo/list',
    method: 'get',
    params: query
  })
}
// 查询出库单列表
export function mainListChukuInfo(query) {
  return request({
    url: '/business/chukuInfo/mainList',
    method: 'get',
    params: query
  })
}
// 查询出库结算单列表
export function listJieSuanChukuInfo(query) {
  return request({
    url: '/business/chukuInfo/jiesuanList',
    method: 'get',
    params: query
  })
}
// 查询流转出库入库
export function listLiuZhanChukuInfo(query) {
  return request({
    url: '/business/chukuInfo/liuzhuanList',
    method: 'get',
    params: query
  })
}

// 查询出库单详细
export function getChukuInfo(id) {
  return request({
    url: '/business/chukuInfo/' + id,
    method: 'get'
  })
}

// 新增出库单
export function addChukuInfo(data) {
  return request({
    url: '/business/chukuInfo',
    method: 'post',
    data: data
  })
}
//添加需要出库的库存信息
export function addChuKuStockinfo(id) {
  return request({
    url: '/business/chukuInfo/addChuKuStockinfo/' + id,
    method: 'get'
  })
}
export function handleAccount(id) {
  return request({
    url: '/business/chukuInfo/handleAccount/' + id,
    method: 'get'
  })
}
export function handleSummary(id) {
  return request({
    url: '/business/chukuInfo/handleSummary/' + id,
    method: 'get'
  })
}
// 修改出库单
export function updateChukuInfo(data) {
  return request({
    url: '/business/chukuInfo',
    method: 'put',
    data: data
  })
}
//执行出
export function zhixingChuku(id) {
  return request({
    url: '/business/chukuInfo/zhixingChuku/' + id,
    method: 'get'
  })
}
// 删除出库单
export function delChukuInfo(id) {
  return request({
    url: '/business/chukuInfo/' + id,
    method: 'delete'
  })
}
